import React from "react";
import {Input} from "antd";
import CommonFlex from "../CommonFlex/index";
import "./index.less";

interface Props {
    label: string; // 标题文本
    value: string | number;
    onChange: (value: string) => void
  }
const LabeInput = (props: Props) => {
    const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
        const { value } = e.target;
        props.onChange(value);
    };



    return (
        <CommonFlex>
            {props.label}
            <Input placeholder="请输入" onChange={handleChange} value={props.value} />
        </CommonFlex>
    );
};
export default LabeInput;